
#include <Windows.h>
#include "../structures.h"

/*
struct CameraResult
{
	double operation_interval;
	CameraResult() : operation_interval(0) {}
};
*/

typedef void * (__cdecl * INIT)(
		int camera_index, 
  		Filter red, 
		Filter green,
		Filter blue,
		Filter empty);

typedef int (__cdecl * DEINIT)(void * subject);
typedef CameraResult (__cdecl * RUN)(void * subject);


void main()
{
	HMODULE dll = LoadLibraryA("camera.dll");
	INIT init = (INIT) GetProcAddress(dll, "initialize");
	DEINIT deinit = (DEINIT) GetProcAddress(dll, "UNinitialize");
	RUN run = (RUN) GetProcAddress(dll, "run_camera");
	
	HSV h;
	Filter f(h, h);
	
	void * instance = init(0, f, f, f, f);
	for (int i=0; i<100; i++)
	{
		CameraResult res = run(instance);
	}
	int i = deinit(instance);

}


















